
  #################################################################################################

  Instructions for replicating: "Measuring Foreign Policy Positions of Members of the US Congress", Political Science Research and Methods. (forthcoming).

  ################################################################################################

  
  All replications are done in R. You need "MCMCpack" package in R. 

  To replicate you need to run four R codes: Figure1_R_code.R, Figure2_R_code.R, Figure3_R_code.R, and Figure4_R_code.R

  All other files are data files. 



  Note: It took more than two weeks for a high-end computer to run "Figure3_R_code.R" with my original setting of MCMC iterations (mcmc=100000 and thin=100).
  For a quick result, I set mcmc=10000 and thin=10 in this code. (Still, it will take a couple of days to complete the iterations, depending on your computer specs.).
  Based on my experience, the results don't change after initial 500 iterations. But the traceplots are not as nice as they are with my original setting.



  <Replication Instruction>


  I. To replicate Figure 1:

  1. Run Figure1_R_code.R: Two datasets are needed: "FP_All_H103.csv" and "House103_Other_Measures.csv"


  II. To replicate Figures 2, 3, and 4:

  1. First, run Figure3_R_code.R: Three datasets are needed: "Figure3_Data1.txt", "Figure3_Data2.txt", and "Figure3_Data3.csv".
  2. It will generate "Summary_Outputs.csv".
  3. Then, run Figure2_R_code.R: It requires "Summary_Outputs.csv" and 33 datasets titled "All_FP_votes_S79th.txt", ..., "All_FP_votes_S111th.txt".
  4. Finally, run Figure4_R_code.R: It requires "Summary_Outputs.csv."
